Commit many changes made

A lot of changes was made in code. Like,  adding tests, and other.