Cleanup and un-generisation