Applied changes to make it read in portrait mode (from here: https://gist.github.com/border/7577978)