added support for compiling elements, fixes #11