Refactoring platforms code to be class oriented; fixing graphs.