Cleaned up formulae, added additional comments