Minor refactorings to follow ruby best practices
adds slug population for posts