Changes: change implementation declarations to interfaces, narrow down imports, add @Override compiler annotation, change 'for' loops to 'foreach' loops.