folder hierarchy and code cleanup