Strait port from modjam2, haven't cleaned up jet :P

Signed-off-by: Captain Shadows <captain_shadows@aol.com>