Basic functionality cleaned up