Move sub [] and sub {} to separate files for easier maintenance