Remove the activity test and refactor a bit