Finished adding code to support touch