Based on https://github.com/telephone/LookingGlass