Bug fixes

A bunch of bugs and dependency conflicts are now removed.