Add codeship badge
Minor refactoring