Updating: tidying up some code
Updating: merge