add tests and cleanup relative asset loading