Boostrap: refactors to match Ruby code