BBCode fixes and enhancements