Cleanups andfixes