Create Public & Private Methods

Adapted from Mozilla.