Should refactor later. Code getting ugly.