Refactored the code-vector representation