Re-organized the modules and added some comments