updated build system and some small changes