Fixes #1 Fixes #2 finish initial implementation