Add working save functionality

Previous merge saved improper files so this commit also fixes it.

Fixes issues #4 and #7