Renamed some methods, minor cleanup
Added ActiveWindow to model
Cleanup
Added device functions