Closes #1. First working version with demo.