Changed how railgun is initialized