Code cleanup & comments