Code cleanup + added todos