some bugfixing regarding history handling + testing of deviceready function