Seperated some code and made an h file.
Finally added a readme.