Added iPad compatibility, bugfixes