removed most or all useless bilerplate code