Gave the code a once over, added comments and todos
More comments