code cleanup + annotations