Element refactor

The constructor for element now takes a hash as a parameter this work kicked of as a result of #10 and closes #10 and #12