fix permission
cleanup some unused stuff