This is the final version for now, got other stuff to work on. I might start it again after my exams.