core: move tests
core: omit redundant brackets in conditions