Improve organization and comments