Fix for issues

Several changes for a few issues; namely #5, #6, #7