fixed wrongly indented elif in compositemap; other minor changes.