improve error handling and mobile styles