system class now working to a basic level. Had to shift out some methods from other places.

Also had to make bounds checking work in main.js class. Not entirely sure if this is the best place to have this method now. Might be best rolled into the system.js class.