Added build() and log() functions.