Cleaned code up to latest electronics layout