Major fixes, the commit fixes #64, fixes #65, fixes #69