Kloadut's PR + functional tests bootstrap

There is still no functional tests but there is most of the bootstrap code to write them.