User tests, and some code optimizations with it