Abstract put into separate file.
Minor refactor.