suspend/resume, fixed layer problems
removed old code