Simplified calculations + code style