Refactored extra codes, and added errors spec, and added more comment to the methods