Fixed accept header parsing.
Changed controller instantiation to static, other minor fixes.