Updated version due to recent refactoring and added specs.