basic module object pattern implemented for categories. Added event handling for editing percentages