Up to date. Fix bugs, and refactor code