Double quote array expansions, otherwise they're like $* and break on spaces
Use $(..) instead of deprecated `..`