removes smelly code and adds force_mobile flag