Added a click event. Also fixed all the things that were messed up by source tree.