set min sdk version to 8 and some slight changes