Minor modifications/code organization