BDI: initial program structure

subject to change!! this is pretty difficult :P

if you think you can contribute, please do send me a message
Merge branch 'master' of https://github.com/mjwwit/smarttd