Labelled crates and tidied code

See comment below :)