Restores old JS loading, cleans code, adds server to gruntfile, other small fixes.