Closes #2 and #1