Second commit, some fixes