Glued functionality together, fixed some bugs and added comments
Merge branch 'master' of https://github.com/wordium/i290P1