CHORE: Some code refactorings
CHORE: Added spec for trace