Refactored preparedformulae.