Remove weird platform code

yet another 1500 LOCs. Removes swig bindings and really weird platform dependent code.