Clean up

Also added some code for shape - but it is not in use