Fixing up some basic functionality