Cleaned up finish code