Implement #CSB-38
Fixed several misc bugs found while implementing
Merge pull request #5 from ShadauxCat/Integration

Implement #CSB-38