Added a userPresent() function for easier checking, minor error fixes.