Fixed some bugs;
Added iPad support;