Remove duplicated code
Fix whitespace
Fix devise migration