Commit, various bugs fixed