add rails 4.0 testing support and overall cleanup