Roxygenised and fixed some warnings