Added animated record button, and optimized some code.