Coursera project 2

Tweaks and bug fixes