Fixed the min problem and added detection of sub-states
Added livereload
Added missing shim
Use cvars where applicable and added source to sourcemap