File Reorganization

Cleaned up code to make more sence and focus on what is needed to be
done.