Formatting
Modified VB code and fix bugs