Major code cleanup. Layout updated. IndexedDB still rough around the edges