Refactored the nbsp thing