Reworked build system config. Should be more flexible.