Added motion-smarticons support. Cleaned up code layout.