Base working code.