Deleted some duplicate code between shape and main. Move includes to shape header.