redid click handling and moved some things around