- did some refactor and cleaned up code