code cleanup + styling fixes