added views to cpu and cleaned up code