Added fill functionality and general tidy up