Done with code. TODO - debug NPEs