Lots of bugs introduced - fixing gradually