added standard indent style and used 'thread-last' macro to simplify form nesting