fixed code

fixed code ready to move onto design?