Added files from Wande's code
Completely added Wande's changes.