Basic ad function.. testing and more class update

this is going to take a while :(!