Preferences moved to custom controller
Fixed some compiler warnings

— I hope they are fixed in correct way ;-)