started cleaning up the code
trying to refactor out web code to separate file
trying to refactor out indexing code to separate file
trying to refactor out index exchange code to separate file