Fixed various bugs and made the build task to check for dependencies actually work