Added 3 more solutions. Optimized some functions in functions.py