Code samples and suggested refactorings