update: commenting the code and cleaning up useless stuff