fixed some formatting and changed the document.ready() to read from index_main instead of mainMatcher