Changed the loading code to use $.Defferred and fixed the code for loading feaxures on demand (on user events)