Basic functionality debugged and working