setup: refactoring & backward compatible changes

See commit messages and changes, it's pretty simple.