Code cleanup and Test Ramping

Cleaned and organized code.
Initial simple test of ramping.