Split out javascript from battletech, cleaned up warnings in Eclipse