Refactors, fixes asset loading.