organized code base

Organized legacy code base into folders.