Final Commit, various bug fixes