Moved factor calculations from security_snapshot.rb to factors.rb