Was done many refactors on previous code. Actually needs more refactor yet, but should be created more tests before this.