Mobile detection

This code could probably get cleaned up