Cleaned up the code
Documented some of the functions
Next step would be to implement fade-in and fade-out