Changes from Kim and cleanup