Better code structure, and uglifying js