More changes towards working code