Added cross-platform compilation, signal handling cases