Made small refactors to behaviour.