Code improvements, cleanups, better README, and sample usage