added cors headers
some tidying
re-write classify path