Fixed some bugs
Added+fixed element constructor