Adapted code base to coding conventions. SmartMarkup not done yet