Mostly refactored except timer and Jintellitype