finished code cleanup and restructure, mode 12h is deleted for personal reasons