Tidied code and made sure we pass R CMD BiocCheck