code cleanup + design adjustment