removed some dead code
merge with master
fixed unresolved class use
Merge pull request #835 from ncos/alloy_cleanup

Removed several ugly constructions from alloy.py
merge with master