Some part of thesis source codes for sharing with colleagues