Minor changes, removed unused code