Began code overhaul