Merge current code with Bay-Dev

Another attempt at merging the two source codes together.