improved boxes and removed old code