cleanup
limit loading of plugins by file extension
fix compilation as shared lib