Code cleanup + code to cleanup data