Fix indentation
Fix handling of external targets

Fix #10