[WILL BREAK A LOT OF CODE] cleanup and refactor