Fix indentation, other syntax errors in elements.py