Added if-statements, updated build tools