Code cleanup, initial jetpack implementation