Refactored the major areas. Need to reimplement screenshot code.