Tidy up the code a bit
Enable immediate mode
Add more calcmode functionality. Breaks immediate calculation