Fix bugs and add codeship config