added checks for jquery modules
whole host of hacks to get frontend vaguely working