First commit, working GDM (untested)