Lots of fixes
Merge branch 'fourth_phase' of https://github.com/MmKolodziej/taio into fourth_phase