Added REST support and refactored indexing
Added support for OPTIONS