Some clean ups like removing unused bits