Optimization, cleanup, added methods