some code cleanup (removed warnings and added enum for Corner)