Cleanup some bugs and dpms