get rid of begin

Change-Id: Idbb5dc0c6dbecd155a56f41b6d7c69150d62077d
big refactor

Change-Id: If303585d41e2f4b5251bd8e7552712b36ad0e5b2