Bug/dp

Fix #53 and #45. Also added Device detection by physical diagonal.
The indent is off on the following constants.