Code refactor

General refactoring (removes unused code, consolidation of elements, code comment edits, increases timeout wait time)