Merged with Ben
Solve some errors