Merged branches, fixed according bugs.