Updated code, code overhaul