Big code clean and tidy