Added basic support for multitouch and slight memory imporvements